<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: 12460
  Date: 2024/12/1
  Time: 16:09
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<html>
<head>
    <title>新增用户</title>
</head>
<body>
    <form action="/update" method="post">
       <center>
        <table>
            <tr>
                <td align="center" colspan="2">修改用户信息</td>
            </tr>
            <tr>
                <td>
                    <%-- 此行隐藏--%>
                    <input type="hidden" name="id" value="${user.id}" />
                </td>
            </tr>
            <tr>
                <td>姓名</td>
                <td>
                    <input type="text" name="username" value="${user.username}" />
                </td>
            </tr>
            <tr>
                <td>密码</td>
                <td>
                    <input type="password" name="password" value="${user.password}" />
                </td>
            </tr>
            <tr>
                <td>性别</td>
                <c:if test="${user.gender==1}">
                    <td>
                        <input type="radio" name="gender"  checked="checked" value="${user.gender}"/>男
                        <input type="radio" name="gender"  value="${user.gender}"/>女
                    </td>
                </c:if>
                <c:if test="${user.gender==0}">
                    <td>
                        <input type="radio" name="gender"  value="${user.gender}"/>男
                        <input type="radio" name="gender" checked="checked"  value="${user.gender}"/>女
                    </td>
                </c:if>
            </tr>
            <tr>
                <td>年龄</td>
                <td>
                    <input type="number" name="age" value="${user.age}" />
                </td>
            </tr>
            <tr>
                <td>地址</td>
                <td>
                    <input type="text" name="address"  value="${user.address}"/>
                </td>
            </tr>
            <tr>
                <td align="center" colspan="2"><input type="submit" value="提交" /> </td>
            </tr>
        </table>
       </center>
    </form>
</body>
</html>
